let routers = [
  // {
  //   path: "/",
  //   redirect: "/home",
  // },
  {
    // 布局页面
    path: "/",
    name: "home",
    // meta:{title:'首页',url:'/home'},
    redirect: { name: "index" },
    component: () => import("@/views/home/index.vue"),
    children: [
      {
        path: "/index",
        name: "index",
        // meta:{title:'首页',url:'/index'},
        component: () => import("@/views/home/index/index.vue"),
      },
      {
        path: "/statistics",
        name: "statistics",
        meta: { title: "数据统计", url: "/statistics" },
        component: () => import("@/views/home/statistics/index"),
      },
      {
        path: "/info",
        name: "info",
        redirect: { name: "infolist" },
        meta: { title: "信息管理", url: "/info" },
        component: () => import("@/views/home/info/index.vue"),
        children: [
          {
            path: "/info/infolist",
            name: "infolist",
            meta: { title: "信息列表", url: "/info/infolist" },
            component: () => import("@/views/home/info/InfoList.vue"),
          },
        ],
      },
      {
        path: "/user",
        name: "user",
        meta: { title: "用户信息", url: "/user" },
        redirect: { name: "userlist" },
        component: () => import("@/views/home/user/index.vue"),
        children: [
          {
            path: "/user/role",
            name: "role",
            meta: { title: "用户角色", url: "/user/role" },
            component: () => import("@/views/home/user/role"),
          },
          {
            path: "/user/userlist",
            name: "userlist",
            meta: { title: "用户列表", url: "/user/userlist" },
            component: () => import("@/views/home/user/UserList"),
          },
        ],
      },
    ],
  },
  {
    // 登录页
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index"),
  },
  {
    path: "/:catchAll(.*)",
    redirect: "/",
  },
];

export default routers;
